package org.apache.ibatis.common.logging.slf4j;

import org.apache.ibatis.common.logging.Log;
import org.slf4j.Logger;

/**
 * @Name Slf4jLoggerImpl
 * @Description: Slf4jImpl 具体实现类
 * @Version v1.0.0
 * @Author: lichao
 * @Date: 2024-05-15 16:08:03
 **/
public class Slf4jLoggerImpl implements Log {
    private final Logger logger;

    public Slf4jLoggerImpl(Logger logger) {
        this.logger = logger;
    }

    @Override
    public boolean isDebugEnabled() {
        return logger.isDebugEnabled();
    }

    @Override
    public boolean isTraceEnbaled() {
        return logger.isTraceEnabled();
    }

    @Override
    public void error(String msg, Throwable e) {
        logger.error(msg, e);
    }

    @Override
    public void error(String msg) {
        logger.error(msg);
    }

    @Override
    public void warn(String msg) {
        logger.warn(msg);
    }

    @Override
    public void debug(String msg) {
        logger.debug(msg);
    }

    @Override
    public void trace(String msg) {
        logger.trace(msg);
    }
}

